const sql = {
  queryAllUser: 'select  * from movie',
  //用户注册
  userRegister: 'insert into user set ?',
  //用户登录前查询是否已经存在账号
  queryUserByUaccount: 'select * from user where uaccount = ?',
  //用户登录
  userLogin: 'select * from user where uaccount = ? and upwd = ?',
  //用户搜索
  searchMovie: 'select * from movie where mname like ?',
  //轮播图
  queryCarousel: 'select * from carousel',
  //电影接口可复用
  queryIndexMovie: 'select * from movie where mtype = 1 order by mrate desc limit 0, ?',
  //电视剧电影接口可复用
  queryIndexTeleplay: 'select * from movie where mtype = 0 order by mrate desc limit 0, ?',
  //首页电影评分前10
  queryIndexTenMovie: 'select * from movie where mtype = 1 order by mscore desc limit 0, 10',
  
  //电影库电影接口，可按电影分类以及热度时间评分排序查询
  // 有问题，暂时不用此sql语句
  // queryMovieMore: 'select * from movie where mcategory like ? and mtype = 1 order by ? desc limit ?, 1',
  //电视剧库电影接口，可按电视剧分类以及热度时间评分排序查询
  // 有问题，暂时不用此sql语句
  // queryTeleplayMore: 'select * from movie where mtype = 0 and mcategory like ? order by ? desc limit ?, 20',

  // 电影库点击率前十部电影
  queryMoreTenMovie: 'select * from movie where mtype = 1 order by mrate desc limit 0, 10',
  //电影详情
  queryMovieInfo: 'select * from movie right outer join comment on movie.mname = comment.moviename where movie.mname = ?',
}

module.exports = sql